//
//  SearchWaitApprovedNewsViewController.m
//  pushNewsManager
//
//  Created by Jobs on 8/6/17.
//  Copyright © 2017 com.Iori. All rights reserved.
//

#import "SearchWaitApprovedNewsViewController.h"
#import "Header.h"
#import "NewsSearchResultViewController.h"


@interface SearchWaitApprovedNewsViewController ()

@end

@implementation SearchWaitApprovedNewsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
    if([segue.identifier isEqualToString:@"segueResult"])
    {
        NewsSearchResultViewController *vc = segue.destinationViewController;
        vc.iSearchType = 0;
        vc.stime = [self.btnStartDate titleForState:UIControlStateNormal];
        vc.etime = [self.btnEndDate titleForState:UIControlStateNormal];
        if(self.radType.selectedButton.tag == 0)
        {
            vc.searchTitleContent = self.txtSearch.text;
        }
        else if(self.radType.selectedButton.tag == 1)
        {
            vc.nickname = self.txtSearch.text;
        }
        else if (self.radType.selectedButton.tag == 2)
        {
            vc.member_id = self.txtSearch.text;
        }
    }
}


-(UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleDefault;
}

-(void)btnSearch_click:(UIButton *)sender
{
    [self performSegueWithIdentifier:@"segueResult" sender:sender];
}
@end
